<?php

declare(strict_types=1);

namespace App\CustHub\Model;

use Mine\MineModel;

/**
 * @property int $id 
 * @property int $uid 客服ID
 * @property int $session_id 会话ID
 * @property int $type 跟进方式
 * @property string $time 跟进时间
 * @property string $content 根据内容
 * @property int $is_next 是否操作了下次提醒：0=否 1=是
 * @property int $status 状态：0=未提醒 1=已提醒
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class ChTalkFollowUpTask extends MineModel
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'ch_talk_follow_up_task';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'uid', 'session_id', 'type', 'time', 'content', 'is_next', 'status', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'uid' => 'integer', 'session_id' => 'integer', 'type' => 'integer', 'is_next' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];

    public function session(): \Hyperf\Database\Model\Relations\HasOne
    {
        return $this->hasOne(ChTalkSession::class, 'id', 'session_id');
    }
}
